<?php
class Userrule_Model_Pagedecision implements Userrule_Model_Mainable {
    
    private $action_handler;
    
    public function main(array $variables = null) {
        //var_dump($variables);
        //die();
        switch($variables['get']['page']){
            case 'aktualizuj-role':
                return $this->insert_user_rule($variables);
                break;
            default:
                return $this->default_action($variables);
                break;
        }
    }
    
    private function insert_user_rule(array $variables = null){
        //var_dump($variables);
        //die();
        $this->action_handler = new Userrule_Model_Updateuserrule;
        return $this->action_handler->main($variables);
    }
    
    private function default_action(array $variables = null){
        unset($variables['get']);
        $this->action_handler = new Userrule_Model_Userrule;
        return $this->action_handler->main($variables);
    }

}

